#include "allow-remove-data-settings.h"
#include "allow-remove-data-settings-form.h"
#include "ui_allow-remove-data-settings-form.h"

AllowRemoveDataSettingsForm::AllowRemoveDataSettingsForm(QWidget *parent) :
    AbstractSettingsForm(parent), ui(new Ui::AllowRemoveDataSettingsForm),
    m_allowRemoveDataSettings(AllowRemoveDataSettings::instance())
{
    ui->setupUi(this);
    ui->checkBox->setChecked(m_allowRemoveDataSettings->isRemovingAllowed());
}

AllowRemoveDataSettingsForm::~AllowRemoveDataSettingsForm()
{
    delete ui;
}

void AllowRemoveDataSettingsForm::saveSettings()
{
    m_allowRemoveDataSettings->setAllowRemove(ui->checkBox->isChecked());
    m_allowRemoveDataSettings->saveSettings();
}
